<?php
/**
 * ============================================================================
 * Copyright (c) 2015-2018 贵州大师兄信息技术有限公司 All rights reserved.
 * siteַ: http://www.dsxcms.com
 * ============================================================================
 * @author:     David Song<songdewei@163.com>
 * @version:    v1.0.0
 * ---------------------------------------------
 * Date: 2018/9/18
 * Time: 下午3:37
 */

namespace App\Library\User;


use App\Models\User;
use Illuminate\Http\Request;

trait UserTrait
{
    public function storeUser(Request $request)
    {

    }

    public function getUser(Request $request)
    {
        $uid = $request->input('uid');
        return User::find($uid);
    }

    public function getUserList(Request $request)
    {

    }

    /**
     * @param User $user
     * @throws \Exception
     */
    public function delUser(User $user)
    {
        $user->delete();
    }
}
